﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Management;
using System.Text;

namespace WMI.NET.CIM
{
    /// <summary>
    /// The CIM_TapeDrive class represents a tape drive on the system. Tape drives are primarily distinguished in that they can only be accessed sequentially.
    /// </summary>
    public class CIM_TapeDrive : CIM_MediaAccessDevice
    {

        private Nullable<UInt32> _EOTWarningZoneSize;
        private Nullable<UInt32> _MaxPartitionCount;
        private Nullable<UInt32> _Padding;

        /// <summary>
        /// Size, in bytes, of the area designated as end-of-tape. Access in this area generates an end-of-tape warning.
        /// </summary>
        public Nullable<UInt32> EOTWarningZoneSize { get { return _EOTWarningZoneSize; } }

        /// <summary>
        /// Maximum partition count for the tape drive.
        /// </summary>
        public Nullable<UInt32> MaxPartitionCount { get { return _MaxPartitionCount; } }

        /// <summary>
        /// Number of bytes inserted between blocks on a tape media.
        /// </summary>
        public Nullable<UInt32> Padding { get { return _Padding; } }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="mbo"></param>
        public CIM_TapeDrive(ManagementBaseObject mbo)
            :base(mbo)
        {
            _EOTWarningZoneSize = mbo.GetUIntValue("EOTWarningZoneSize");
            _MaxPartitionCount = mbo.GetUIntValue("MaxPartitionCount");
            _Padding = mbo.GetUIntValue("Padding");
        }

    }
}
